package com.zll.logtest.controller;

import com.zll.logtest.mapper.UserMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Description
 * @Author ZhangLinlu
 * @Date 2020/12/17
 **/
@Slf4j
@RestController
@RequestMapping("test")
public class TestController {

    @Resource
    private UserMapper userMapper;

    @GetMapping("1")
    public Object test() {
        log.error("error了");
        log.warn("warn了");
        log.info("info了");
        log.debug("debug了");
        log.trace("trace了");
        return userMapper.selectList(null);
    }

}
